package com.hd.trans.ui.model;



import com.hd.trans.db.bean.HuDunLanguage;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;


/**
 * Author: yang
 * Date: 2020/1/6 18:36
 * Desc: 语音翻译页面数据
 */
public class HomeVoiceModel extends ViewModel {

    private MutableLiveData<HuDunLanguage> mLanguageFrom; // 源语言
    private MutableLiveData<HuDunLanguage> mLanguageTo; // 目标语言


    //Constants.VoicePageState
    /**
     * 当前状态
     *
     * @see com.hd.trans.common.Constants.VoiceRecordState
     */
    private MutableLiveData<Integer> mVoiceState;

    private MutableLiveData<HuDunLanguage> mOperateLanguage; // 当前操作语言


    public MutableLiveData<HuDunLanguage> getLanguageFrom() {
        if (mLanguageFrom == null) {
            mLanguageFrom = new MutableLiveData<>();
        }
        return mLanguageFrom;
    }

    public void setLanguageFrom(HuDunLanguage item) {
        if (mLanguageFrom == null) {
            mLanguageFrom = new MutableLiveData<>();
        }
        mLanguageFrom.setValue(item);
    }

    public MutableLiveData<HuDunLanguage> getLanguageTo() {
        if (mLanguageTo == null) {
            mLanguageTo = new MutableLiveData<>();
        }
        return mLanguageTo;
    }

    public void setLanguageTo(HuDunLanguage item) {
        if (mLanguageTo == null) {
            mLanguageTo = new MutableLiveData<>();
        }
        mLanguageTo.setValue(item);
    }


    public MutableLiveData<Integer> getVoicePageState() {
        if (mVoiceState == null) {
            mVoiceState = new MutableLiveData<>();
        }
        return mVoiceState;
    }

    public void setVoicePageState(Integer val) {
        if (mVoiceState == null) {
            mVoiceState = new MutableLiveData<>();
        }
        mVoiceState.setValue(val);
    }


    public MutableLiveData<HuDunLanguage> getOperateLanguage() {
        if (mOperateLanguage == null) {
            mOperateLanguage = new MutableLiveData<>();
        }
        return mOperateLanguage;
    }

    public void setOperateLanguage(HuDunLanguage item) {
        if (mOperateLanguage == null) {
            mOperateLanguage = new MutableLiveData<>();
        }
        mOperateLanguage.setValue(item);
    }

}